{include file="public/header"}
<title>评价</title>
<link rel="stylesheet" type="text/css" href="__CSS__/aui.css" />
<style>
    body {
        width: 100%;
        height: 100%;
        margin: 0;
        padding: 0;
        background-color:#F5F5F6;
    }
    /*头部*/

    .top {
        height: 60px;
        width: 100%;
        background: rgba(22, 26, 39, 1);
    }

    .top_box {
        width: 1200px;
        height: 100%;
        margin: 0 auto;
        align-items: center;
    }

    .top_name_left,
    .top_name_left img {
        width: 150px;
        height: 40px;
    }

    .top_name {
        height: 60px;
        font-size: 24px;
        font-family: PingFangSC-Medium;
        font-weight: 500;
        color: rgba(255, 255, 255, 1);
        line-height: 60px;
    }

    .top_name_r {
        width: 76px;
        height: 30px;
        border-radius: 15px;
        border: 1px solid rgba(255, 255, 255, 1);
        margin-left: 26px;
        align-items: center;
        justify-content: center;
        display: flex;
    }

    .top_name_r img {
        height: 16px;
        width: 16px;
    }

    .top_name_r span {
        height: 22px;
        line-height: 22px;
        font-size: 16px;
        font-family: PingFangSC-Regular;
        font-weight: 400;
        color: rgba(255, 255, 255, 1);
        margin-left: 3px;
    }

    .lii {
        height: 22px;
        font-size: 16px;
        font-family: PingFangSC-Regular;
        font-weight: 400;
        color: #84868D;
        line-height: 22px;
        margin-right: 24px;
    }

    .white {
        color: #fff;
    }

    .top_login {
        /*margin-left: 36px;*/
        display: flex;
        align-items: center;
    }

    .top_login img {
        width: 28px;
        height: 28px;
    }

    .top_login span {
        height: 22px;
        font-size: 16px;
        font-family: PingFangSC-Regular;
        font-weight: 400;
        color: rgba(255, 255, 255, 1);
        line-height: 22px;
        margin-left: 8px;
    }

    .top_marginR {
        margin-right: 16px;
    }
    /*头部*/
    /*footer2样式*/

    .footer2 {
        width: 100%;
        height: 168px;
        background: rgba(255, 255, 255, 1);
        box-shadow: 0px -8px 20px 0px rgba(0, 0, 0, 0.04);
    }

    .footerint {
        width: 1200px;
        height: 100%;
        margin: 0 auto;
        position: relative;
    }

    .footer_word {
        padding-top: 20px;
        padding-left: 268px;
    }

    .footer_word span {
        width: 420px;
        height: 68px;
        font-size: 22px;
        font-family: PingFangSC-Medium;
        font-weight: 500;
        color: rgba(51, 51, 51, 1);
        line-height: 34px;
        margin-bottom: 25px;
    }

    .footer_js {
        height: 21px;
        font-size: 15px;
        font-family: PingFangSC-Regular;
        font-weight: 400;
        color: rgba(153, 153, 153, 1);
        line-height: 21px;
        margin-right: 25px;
    }

    .footer_ma {
        width: 120px;
        height: 120px;
        padding-top: 25px;
        padding-right: 75px;
    }

    .footer_ma img {
        width: 100%;
        height: 100%;
    }

    .footer_phone {
        width: 145px;
        height: 200px;
        position: absolute;
        bottom: 0;
        left: 94px;
        box-shadow: 0px 18px 20px 0px rgba(0, 0, 0, 0.08);
    }

    .footer_phone img {
        width: 100%;
        height: 100%;
    }

    .footer_del {
        width: 16px;
        height: 16px;
        position: absolute;
        top: 17px;
        right: 3px;
    }

    .footer_del img {
        width: 100%;
        height: 100%;
    }
    /*footer2样式*/
    /*footer1样式*/

    .footer {
        width: 100%;
        height: 130px;
        background: rgba(31, 31, 31, 1);
        display: flex;
        align-items: center;
    }

    .footer_in {
        width: 1210px;
        margin: 0 auto;
        height: 18px;
        font-size: 13px;
        font-family: PingFangSC-Regular;
        font-weight: 400;
        color: rgba(153, 153, 153, 1);
        line-height: 18px;
    }
    /*footer1样式*/

    /*内容*/

    .outer {
        width: 1200px;
        height:732px;
        margin: 0 auto 111px;
        background-color: #fff;
        box-sizing: border-box;
    }

    /*内容*/
    .bar{
        width:1200px;
        height:57px;
        align-items:center;
        margin: 0 auto;
        font-size:12px;
        color:#999999;
    }
    .right_arrow{
        width:14px;
        height:14px;
        margin-left:6px;
        margin-right:6px;
    }
    .tit{
        height:100px;
        line-height: 100px;
        border-bottom:1px solid #EDEDED;
        padding-left:26px;
        font-size:23px;
        font-weight:500;
        color:rgba(51,51,51,1);
    }
    .xing{
        padding:28px 28px 44px 28px;
    }
    .star{
        display: inline-block;
        width: 28px;
        height: 26px;
        background: url(__IMG__/star22.png) no-repeat center center;
        background-size: 28px 26px;
        margin-right:11px;
    }
    .star_active{
        display: inline-block;
        width: 28px;
        height: 26px;
        background: url(__IMG__/star11.png) no-repeat center center;
        background-size: 28px 26px;
    }
    .all{
        padding:30px;
        background:rgba(239,239,239,0.3);
        height:150px;
        margin:0 26px 30px;
    }
    .label{
        float:left;
        padding-left:14px;
        padding-right:14px;
        height:34px;
        border-radius:3px;
        border:1px solid rgba(207,210,216,1);
        font-size:14px;
        font-weight:400;
        color:rgba(102,102,102,1);
        text-align: center;
        line-height:34px;
        margin-right:20px;
        margin-bottom:20px;
    }
    .label_active{
        background:rgba(235,250,242,1);
        border-radius:4px;
        border:1px solid rgba(106,182,144,1);
        color:rgba(106,182,144,1);
    }
    .btn{
        width:190px;
        height:54px;
        background:rgba(106,182,144,1);
        border-radius:6px;
        text-align: center;
        line-height:54px;
        font-size:14px;
        font-weight:400;
        color:rgba(255,255,255,1);
        cursor: pointer;
    }
    .button{
        padding-right:26px;
    }
</style>

<body>
<!--hidden-->
<div class="container">
    <div class="bar flex-wrap">
        置家优选 <img src="__IMG__/right_arrow.png" class="right_arrow" />全部评论
    </div>

    <div class="outer">
        <div class="contents">
            <div class="tit">用户评价</div>
        </div>
        <div class="xing">
            <div class="star star_active"></div>
            <div class="star"></div>
            <div class="star"></div>
            <div class="star"></div>
            <div class="star"></div>
        </div>
        <div class="all after">
            {volist name="c_ss" id='c'}
            <div class="label">{$c.us_name}</div>
            {/volist}
        </div>
        <div class="button flex-wrap">
            <div class="flex-con"></div>
            <div class="btn">提交</div>
        </div>
    </div>
</div>
{include file="public/foot1"}

</body>
</html>
<script src="/static/admin/js/jquery.min.js"></script>
<script>
    $('.star').click(function () {
        $('.star').removeClass('star_active');
        var this_i = $(this).index();
        for (var i=0;i<=this_i;i++){
            $('.star').eq(i).addClass('star_active');
        }
    });
    $('.label').click(function () {
        if($(this).hasClass('label_active')){
            $(this).removeClass('label_active');
        }else{
            $(this).addClass('label_active');
        }
    });
    /**
     * ajax提交
     */
    $('.btn').click(function () {
        var uid = {$uid};
        var star = $('.star_active').length;
        var signs = '';
        $('.label_active').each(function (i,d) {
            var ss = $(d).text();
            signs += ss + ',';
        });
        if(signs == ''){
            alert('请选择评语！');
            return;
        }
        $.ajax({
            url: '/home/Economic/gocomm',
            data: 'uid='+uid+'&star='+star+'&signs='+signs,
            type: 'POST',
            dataType: 'JSON',
            success: function (returnData) {
                alert(returnData.msg);
                if(returnData.code == 200){
                    window.location.href = '/home/Economic/allComm?uid='+{$uid};
                }
            },
            error: function () {
                alert('服务器错误，请刷新重试！');
            }
        })
    });
</script>
